import React, { Component } from 'react';
import {
  StyleSheet,
  Text,
  View,
    TextInput
} from 'react-native';


export default class App extends Component<{}> {

  constructor(){
      super();
      this.state = {
        bg:'purple'
      }
  }


  render() {
    return (
      <View style={styles.container}>

        <Text>后盾人 人人做后盾！</Text>
          <TextInput
            style={styles.ti}
            onChangeText={(x)=>{
                this.setState({
                    bg:x
                })
            }}
          />
        
          <View
              style={{width:'60%',height:400,backgroundColor:this.state.bg}}
          ></View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  ti:{
    // backgroundColor:'purple',
    //   color:'yellow',
      fontSize:60
  },
    hd:{
    width:'60%',
        height:400,
        // backgroundColor:'purple',
        color:'yellow',
        fontSize:50
    }
});
